package com.lvhx.springboot.springbatch.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.batch.core.StepContribution;
import org.springframework.batch.core.scope.context.ChunkContext;
import org.springframework.batch.core.step.tasklet.Tasklet;
import org.springframework.batch.repeat.RepeatStatus;

/**
 * @auther 吕宏旭
 * @date 2019/9/5 14:15
 */
@Slf4j
public class ParentTasklet implements Tasklet {

    @Override
    public RepeatStatus execute(StepContribution stepContribution, ChunkContext chunkContext) throws Exception {
        log.info("=====获取批量参数：{} ", username);
        return RepeatStatus.FINISHED;
    }

    private String username;

    public void setUsername(String username) {
        this.username = username;
    }
}
